/**
 * Generate time : 2011-06-21 18:16:22
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.common.zm.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;

import java.util.HashMap;
import java.util.Map;

import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCDDocuments
 * 
 */
@SuppressWarnings("serial")
public class ZMCDDocuments extends DaoEPBase {

	private String fdKeyId = " "; /* 主键 */
	private String fdTitle = " "; /* 标题 */
	private String fdCreateDate = " "; /* 编制日期 */
	private String fdDepartmentId = " "; /* 编制单位 */
	private String fdCreatorId = " "; /* 编制人 */
	private String fdCreator = " "; /* 编制人 */	
	private String fdTypeId = " "; /* 文档类型 */
	private String fdBusinessId = " "; /* 业务属性 */
	private String fdEngineeringId = " "; /* 对应工程 */
	private String fdDirId = " "; /* 所在目录 */
	private String fdProfessionId = " "; /* 对应业务ID */
	private String fdRemarks = " "; /* 文档用途备注 */
	private Long fdStatus = new Long(0); /* 状态 */
	private String fdMiningId="";
	private String fdDocId = " ";     /* 文件id*/


	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;
		eiColumn = new EiColumn("fdMiningId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("所属矿");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdTitle");
		eiColumn.setFieldLength(500);
		eiColumn.setDescName("标题");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdCreateDate");
		eiColumn.setFieldLength(14);
		eiColumn.setDescName("编制日期");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDepartmentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("编制单位");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdCreatorId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("编制人");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdCreator");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("编制人姓名");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdTypeId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("文档类型");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdBusinessId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("业务属性");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEngineeringId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("对应工程");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDirId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("所在目录");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProfessionId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("对应业务ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRemarks");
		eiColumn.setFieldLength(200);
		eiColumn.setDescName("文档用途备注");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStatus");
		eiColumn.setType("N");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName("状态");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDocId");
		eiColumn.setFieldLength(35);	
		eiColumn.setDescName("文件id");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCDDocuments() {
		initMetaData();
	}

	public String getFdMiningId() {
		return fdMiningId;
	}

	public void setFdMiningId(String fdMiningId) {
		this.fdMiningId = fdMiningId;
	}

	/**
	 * get the fdKeyId - 主键
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdTitle - 标题
	 * 
	 * @return the fdTitle
	 */
	public String getFdTitle() {
		return this.fdTitle;
	}

	/**
	 * set the fdTitle - 标题
	 */
	public void setFdTitle(String fdTitle) {
		this.fdTitle = fdTitle;
	}

	/**
	 * get the fdCreateDate - 编制日期
	 * 
	 * @return the fdCreateDate
	 */
	public String getFdCreateDate() {
		return this.fdCreateDate;
	}

	/**
	 * set the fdCreateDate - 编制日期
	 */
	public void setFdCreateDate(String fdCreateDate) {
		this.fdCreateDate = fdCreateDate;
	}

	/**
	 * get the fdDepartmentId - 编制单位
	 * 
	 * @return the fdDepartmentId
	 */
	public String getFdDepartmentId() {
		return this.fdDepartmentId;
	}

	/**
	 * set the fdDepartmentId - 编制单位
	 */
	public void setFdDepartmentId(String fdDepartmentId) {
		this.fdDepartmentId = fdDepartmentId;
	}

	/**
	 * get the fdCreatorId - 编制人
	 * 
	 * @return the fdCreatorId
	 */
	public String getFdCreatorId() {
		return this.fdCreatorId;
	}
	
	/**
	 * set the fdCreatorId - 编制人
	 */
	public void setFdCreatorId(String fdCreatorId) {
		this.fdCreatorId = fdCreatorId;
	}

	/**
	 * set the fdCreatorId - 编制人姓名
	 */
	public void setFdCreator(String fdCreator) {
		this.fdCreator = fdCreator;
	}
	
	/**
	 * get the fdCreatorId - 编制人姓名
	 * 
	 * @return the fdCreatorId
	 */
	public String getFdCreator() {
		return this.fdCreator;
	}



	/**
	 * get the fdTypeId - 文档类型
	 * 
	 * @return the fdTypeId
	 */
	public String getFdTypeId() {
		return this.fdTypeId;
	}

	/**
	 * set the fdTypeId - 文档类型
	 */
	public void setFdTypeId(String fdTypeId) {
		this.fdTypeId = fdTypeId;
	}

	/**
	 * get the fdBusinessId - 业务属性
	 * 
	 * @return the fdBusinessId
	 */
	public String getFdBusinessId() {
		return this.fdBusinessId;
	}

	/**
	 * set the fdBusinessId - 业务属性
	 */
	public void setFdBusinessId(String fdBusinessId) {
		this.fdBusinessId = fdBusinessId;
	}


	/**
	 * get the fdEngineeringId - 对应工程
	 * 
	 * @return the fdEngineeringId
	 */
	public String getFdEngineeringId() {
		return this.fdEngineeringId;
	}

	/**
	 * set the fdEngineeringId - 对应工程
	 */
	public void setFdEngineeringId(String fdEngineeringId) {
		this.fdEngineeringId = fdEngineeringId;
	}

	/**
	 * get the fdDirId - 所在目录
	 * 
	 * @return the fdDirId
	 */
	public String getFdDirId() {
		return this.fdDirId;
	}

	/**
	 * set the fdDirId - 所在目录
	 */
	public void setFdDirId(String fdDirId) {
		this.fdDirId = fdDirId;
	}

	/**
	 * get the fdProfessionId - 对应业务ID
	 * 
	 * @return the fdProfessionId
	 */
	public String getFdProfessionId() {
		return this.fdProfessionId;
	}

	/**
	 * set the fdProfessionId - 对应业务ID
	 */
	public void setFdProfessionId(String fdProfessionId) {
		this.fdProfessionId = fdProfessionId;
	}

	/**
	 * get the fdRemarks - 文档用途备注
	 * 
	 * @return the fdRemarks
	 */
	public String getFdRemarks() {
		return this.fdRemarks;
	}

	/**
	 * set the fdRemarks - 文档用途备注
	 */
	public void setFdRemarks(String fdRemarks) {
		this.fdRemarks = fdRemarks;
	}

	/**
	 * get the fdStatus - 状态
	 * 
	 * @return the fdStatus
	 */
	public Long getFdStatus() {
		return this.fdStatus;
	}

	/**
	 * set the fdStatus - 状态
	 */
	public void setFdStatus(Long fdStatus) {
		this.fdStatus = fdStatus;
	}
	
	/**
	 * get the fdDocId - 文件id
	 * @return the fdDocId
	 */
	public String getFdDocId() {
		return this.fdDocId;
	}
	
	/**
	 * set the fdDocId - 文件id
	 */
	public void setFdDocId(String fdDocId) {
		this.fdDocId = fdDocId;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		
		setFdMiningId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMiningId")), fdMiningId));
		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdTitle(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdTitle")), fdTitle));
		setFdCreateDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCreateDate")), fdCreateDate));
		setFdDepartmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepartmentId")), fdDepartmentId));
		setFdCreatorId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCreatorId")), fdCreatorId));
		setFdCreator(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCreator")), fdCreator));
		setFdTypeId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdTypeId")), fdTypeId));
		setFdBusinessId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdBusinessId")), fdBusinessId));
		setFdEngineeringId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEngineeringId")), fdEngineeringId));
		setFdDirId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDirId")), fdDirId));
		setFdProfessionId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProfessionId")), fdProfessionId));
		setFdRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRemarks")), fdRemarks));
		setFdStatus(NumberUtils.toLong(StringUtils.toString(map.get("fdStatus")), fdStatus));
		setFdDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDocId")), fdDocId));

	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdMiningId", StringUtils.toString(fdMiningId, eiMetadata.getMeta("fdMiningId")));
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdTitle", StringUtils.toString(fdTitle, eiMetadata.getMeta("fdTitle")));
		map.put("fdCreateDate", StringUtils.toString(fdCreateDate, eiMetadata.getMeta("fdCreateDate")));
		map.put("fdDepartmentId", StringUtils.toString(fdDepartmentId, eiMetadata.getMeta("fdDepartmentId")));
		map.put("fdCreatorId", StringUtils.toString(fdCreatorId, eiMetadata.getMeta("fdCreatorId")));
		map.put("fdCreator", StringUtils.toString(fdCreator, eiMetadata.getMeta("fdCreator")));
		map.put("fdTypeId", StringUtils.toString(fdTypeId, eiMetadata.getMeta("fdTypeId")));
		map.put("fdBusinessId", StringUtils.toString(fdBusinessId, eiMetadata.getMeta("fdBusinessId")));
		map.put("fdEngineeringId", StringUtils.toString(fdEngineeringId, eiMetadata.getMeta("fdEngineeringId")));
		map.put("fdDirId", StringUtils.toString(fdDirId, eiMetadata.getMeta("fdDirId")));
		map.put("fdProfessionId", StringUtils.toString(fdProfessionId, eiMetadata.getMeta("fdProfessionId")));
		map.put("fdRemarks", StringUtils.toString(fdRemarks, eiMetadata.getMeta("fdRemarks")));
		map.put("fdStatus", StringUtils.toString(fdStatus, eiMetadata.getMeta("fdStatus")));
		map.put("fdDocId",StringUtils.toString(fdDocId, eiMetadata.getMeta("fdDocId")));	

		return map;

	}
}